/**
 * 2010(c) Copyright Oceansoft Information System Co.,LTD. All rights reserved.
 * <p>
 * Compile: JDK 1.6+
 * <p>
 * 版权所有(C)：江苏欧索软件有限公司
 * <p>
 * 公司名称：江苏欧索软件有限公司
 * <p>
 * 公司地址：中国苏州科技城青山路1号
 * <p>
 * 网址: http://www.oceansoft.com.cn
 * <p>
 * 作者: 090922(陈伟)
 * <p>
 * 文件名: com.oceansoft.mobile.client.Constant.java
 * <p>
 * 类产生时间: 14-2-12 下午4:02
 * <p>
 * 负责人: 090922(陈伟)
 * <p>
 * Email:javacspring@gmail.com
 * <p>
 * 所在组 : 掌上公安应用平台
 * <p>
 * 所在部门: 开发部--手持技术部
 * <p>
 * <p>
 */
package com.oceansoft.mobile.econsole.common.constant;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.util.HashMap;

/**
 * 系统全局常量
 *
 * @author: chenw
 * @time: 14-2-12 下午4:02
 */
public class Constant {

//    public static final String ProjectUploadIP = "http://222.170.81.185";//线下测试大厅地址
    public static final String ProjectUploadIP = "http://100.101.1.3";//发布线上大厅地址
//    public static final String ProjectUploadIP = "http://172.17.118.91:9088";

    //测试地址 "http://172.17.118.91:8070/";  "http://gafw.jl.gov.cn/";

    /**
     * 重新绑定手机
     */
    public static final int SMS_BIZ_REBIND_MOBILE = 1;
    /**
     * 注册新用户
     */
    public static final int SMS_BIZ_REGISTER = 2;
    /**
     * 重置用户密码
     */
    public static final int SMS_BIZ_RESET_PASSWORD = 3;

    /**
     * 短信发送业务类型字典
     */
    public static final HashMap<Integer, String> BIZ_DICT = new HashMap<Integer, String>() {
        {
            put(SMS_BIZ_REGISTER, "register");//注册新用户
            put(SMS_BIZ_RESET_PASSWORD, "resetpwd");//重置密码
            put(SMS_BIZ_REBIND_MOBILE, "rebindtel");//重新绑定手机
        }
    };

    /**
     * 操作日志内容标识
     */
    public static final String OPERATION_LOG_CONTENT = "operation_log_content";
    /**
     * 是否记录默认操作日志，此标识用于在控制器中调用方法时不手动调用log()方法时系统记录的日志内容
     */
    public static final boolean RECORD_DEFAULT_OPERATION_LOG = false;
    /**
     * 新闻采集系统对接密钥盐值
     */
    public static final String TOKEN_SALT = "754951f3-9fb6-4601-ade3-49b14a0fbf93";
    /**
     * 客户端分页大小
     */
    public static final int API_PAGE_SIZE = 10;

    public static final String PLUGIN = "plugins";
    //部署真实环境改成服务器IP
    public static final String ACCIDENT = "accident";
    public static final String SERVER_LOCALHOST = "localhsot";
    public static final String SERVER_LOCALHOST_IP = "127.0.0.1";
    /**
     * 发布模式
     */
    public static final boolean MODEL_RELEASE = false;
    public static final String ZERO_STR = "0";
    public static final int ZERO = 0;
    public static final int ONE = 1;
    /**
     * 事故自行协商
     */
    public static final int ACCIDENT_PROCESS_NEGOTIATE = 1;
    /**
     * 远程定责
     */
    public static final int ACCIDENT_PROCESS_REMOTE = 2;
    /**
     * 事故理赔中心处理
     */
    public static final int ACCIDENT_PROCESS_OFFICE = 3;

    /**
     * 本人强制保险背面图片
     */
    public static final int ACCIDENT_PHOTO_INSURE_A = 3;
    
    /**
     * 对方强制保险背面图片
     */
    public static final int ACCIDENT_PHOTO_INSURE_B = 4;
    /**
     * 事故图片--车头方向
     */
    public static final int ACCIDENT_PHOTO_HEAD = 5;
    /**
     * 事故图片--车尾方向
     */
    public static final int ACCIDENT_PHOTO_TAIL = 6;
    /**
     * 事故图片--车身部位(碰撞点)
     */
    public static final int ACCIDENT_PHOTO_BODY = 7;
    /**
     * 全局分页值
     */
    public static int PAGE_SIZE = 11;
    /**
     * 普通用户SESSION标识位
     */
    public static String SESSION_USER = "session_user";
    /**
     * 微信用户SESSION标识位
     */
    public static String SESSION_MEMBER = "session_wxmember";
    /**
     * 登录用户权限集合
     */
    public static String SESSION_USER_PRIVILEGE = "session_user_privilege";
    /**
     * 新增操作
     */
    public static String ACTION_CREATE = "C";
    /**
     * 更新操作
     */
    public static String ACTION_UPDATE = "U";
    /**
     * 读取操作
     */
    public static String ACTION_READ = "R";
    /**
     * 删除操作
     */
    public static String ACTION_DELETE = "D";

    public static String DEFAULT_USER_PASSWORD = "123456";
    /**
     * 系统字典表--用户状态
     */
    public static int DICT_ITEM_USER_STATUS = 6;
    /**
     * 系统字典表--用户访问权限
     */
    public static int DICT_ITEM_USER_POWER = 10;

    /**
    *返回市级组织结构所需常量
     */
    public static  String ORG_TOP="3205";
    public static  String ORG_STYPE_DS="3";

    /**
     * 当前城市
     */
    public static final String CURRENT_CITY = "currentCity";

    /**
    返回市级组织机构下一级所需常量
  */
    public static  String ORG_STYPE_FJ="2";

    /**
     * 道路监控点存放目录
     */
    public static String genRoadDirPath(String equipmentId) {
        return String.format("road/%s", equipmentId);
    }

    /**
     * 货车临时通行证、二维码存放路径
     */
    public static String genPassportPath() {
        return "passport";
    }

    public static String getTempDir() {
        return FileUtils.getTempDirectoryPath();
    }
    /**
     * 商家管理员SESSION标识位
     */
    public static String GLOBAL_SESSION = "GLOBAL_SESSION";
    /**
     * 商家业务附件存储路径前缀
     */
//    public static final String BIZ_FILE_PATH_PREFIX = "saestor://";
    public static final String BIZ_FILE_PATH_PREFIX = "biz";
    /**
     * 文章图片目录
     */
    public static String PIC_ART_PATH="articlepic";
    public static String sep= File.separator;
    /**
     * 商家图片目录
     */
    public static String PIC_BASE_PATH=sep+"usr"+sep+"share"+sep+"szgawx"+sep+"static";
    /**
     * 操作数据库唯一记录成功
     */
    public static final int DB_OPER_ONE_SUCC = 1;
    public static String THEMEID="themeId";
    public static String MERCHANTID="mer_Id";

    /**
     * 数据字典父节点key
     */
    public static final String DICT_CAR_TYPE = "car_type";

    /**
     * 数据字典父节点key
     */
    public static final String DICT_SEARCH_METHOD = "CPoliceSearchType";

    /**
     * 数据字典父节点key
     */
    public static final String DICT_SYS_PARAMATER = "sysparamter";

    /**
     * 高速路况部门辖区
     */
    public static final String SITUATION_AREA_POPEDOM = "00";
    /**
     * 高速路况部门全省
     */
    public static final String SITUATION_AREA_PROVINCE = "01";

    /**
     * 高速路况部门
     */
    public static final HashMap<String, String> SITUATION_AREA = new HashMap<String, String>() {
        {
            put(SITUATION_AREA_POPEDOM, "辖区");//高速路况部门辖区
            put(SITUATION_AREA_PROVINCE, "全省");//重置密码
        }
    };

    /**
     * 入口关闭
     */
    public static final String SITUATION_HIGHWAY_CLOSE = "10";

    /**
     * 通行正常
     */
    public static final String SITUATION_HIGHWAY_NORMAL = "20";

    /**
     * 交通拥堵
     */
    public static final String SITUATION_HIGHWAY_BUSY = "30";


    public static final HashMap<String, String> SITUATION_HIGHWAY = new HashMap<String, String>() {
        {
            put(SITUATION_HIGHWAY_CLOSE, "入口关闭");//入口关闭
            put(SITUATION_HIGHWAY_NORMAL, "通行正常");//通行正常
            put(SITUATION_HIGHWAY_BUSY, "交通拥堵");//交通拥堵
        }
    };

    /**
     * 机动车号牌种类
     */
    public static final String JDCHPZL = "jdchpzl";


    /**
     * 城市服务接口返回状态码
     */
    public static final int STATUS_CODE_100101 = 100101;//获取机动车违法列表成功 对应succ为true
    public static final int STATUS_CODE_100102 = 100102;//查询条件已提交、等待查询结果 对应succ为true
    public static final int STATUS_CODE_100198 = 100198;//没有查询到相应的数据 对应succ为false
    public static final int STATUS_CODE_100199 = 100199;//缺少查询参数 对应succ为false

    //邮寄类型
    public static final String MAIL_TYEP_1 = "1";
    public static final String MAIL_TYPE_2 = "2";

    //支付方式
    public static final String MAIL_PAY_TYEP_0 = "0";
    public static final String MAIL_PAY_TYEP_1 = "1";

    // 办件isMailMertal类型
    public static final String MAIL_MERTAL_0 = "0";
    public static final String MAIL_MERTAL_10 = "10";
    public static final String MAIL_MERTAL_11 = "11";
    public static final String MAIL_MERTAL_20 = "20";
    public static final String MAIL_MERTAL_21 = "21";

    //access_token
    public static final String ACCESS_TOKEN = "access_token";

    //ticket
    public static final String TICKET = "ticket";

    /**短信模板**/
    public static final String REGISTER_MSG = "你本次验证码为%s请在2分钟内使用此验证码";// 注册短信
    public static final String COMMUNITY_POLICE_MSG = "    求诉人：%s 联系方式：%s";// 社区微警务短信

    public static final String SUB_NEWS_TAG = "register";//新闻订阅

    /** 到期提醒业务信息模板 **/
    public static final String EXPIRE_WARN_MSG_IC = "您的身份证有效期将于%s到期，请您及时换领。";//身份证
    public static final String EXPIRE_WARN_MSG_AC = "您的车辆%s年检将于%s到期，请您及时到交管部门办理相关手续。";//年检
    public static final String EXPIRE_WARN_MSG_VL = "您的驾驶证年检将于%s到期，请您及时到交管部门办理相关手续。";//驾驶证
    public static final String EXPIRE_WARN_MSG_VV = "您的车辆%s于%s，%s发生违章，请您登录平安大庆微信或手机APP查看详细情况，尽快到交管部门处理违章。";//违章

    /**顶级部门，即大庆市局**/
    public static final String TOP_ORG = "230600000000";

    public static final String WECHAT_USER = "WEI";

    public static final String FILE_URL = "http://ynwx.yungov.cn:8080/";

}
